//    Copyright (C) 2013  <lugocreation@gmail.com>
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.jpgolay.me.customer;

import java.io.Serializable;
import java.math.BigDecimal;

public class Customer
        implements Serializable {

    public Customer() {
    }

    public Customer(String id, String idGLN, String raisonSociale, String civilite, String adresseFactUn, String adresseFactDeux, String adresseLivrUn,
            String adresseLivrDeux, String cpFact, String villeFact, String paysFact, String cpLivr, String villeLivr, String paysLivr,
            String nomPrenomContact, String fonctionContact, String telephone, String portable, String fax, String numeroCompte, String modeReglement,
            String commentaire, String email, String siteWeb, String familleClientId, String banque, BigDecimal remise, BigDecimal remiseFidelite,
            BigDecimal totalEncaisser, BigDecimal cotaFidelite, BigDecimal echeancePaiement, Integer commerciauxId, String updateLastUserId, String updateLastTime, String userId,
            byte photo1[], byte photo2[]) {
        setId(id);
        setIdGLN(idGLN);
        setRaisonSociale(raisonSociale);
        setCivilite(civilite);
        setAdresseFactUn(adresseFactUn);
        setAdresseFactDeux(adresseFactDeux);
        setAdresseLivrUn(adresseLivrUn);
        setAdresseLivrDeux(adresseLivrDeux);
        setCpFact(cpFact);
        setVilleFact(villeFact);
        setPaysFact(paysFact);
        setCpLivr(cpLivr);
        setVilleLivr(villeLivr);
        setPaysLivr(paysLivr);
        setNomPrenomContact(nomPrenomContact);
        setFonctionContact(fonctionContact);
        setTelephone(telephone);
        setPortable(portable);
        setFax(fax);
        setNumeroCompte(numeroCompte);
        setModeReglement(modeReglement);
        setCommentaire(commentaire);
        setEmail(email);
        setSiteWeb(siteWeb);
        setFamilleClientId(familleClientId);
        setBanque(banque);
        setRemise(remise);
        setRemiseFidelite(remiseFidelite);
        setTotalEncaisser(totalEncaisser);
        setCotaFidelite(cotaFidelite);
        setEcheancePaiement(echeancePaiement);
        setCommerciauxId(commerciauxId);
        setUpdateLastUserId(updateLastUserId);
        setUpdateLastTime(updateLastTime);
        setUserId(userId);
        setPhoto1(photo1);
        setPhoto2(photo2);
    }

    public Customer(Customer customer) {
        setId(customer.getId());
        setIdGLN(customer.getIdGLN());
        setRaisonSociale(customer.getRaisonSociale());
        setCivilite(customer.getCivilite());
        setAdresseFactUn(customer.getAdresseFactUn());
        setAdresseFactDeux(customer.getAdresseFactDeux());
        setAdresseLivrUn(customer.getAdresseLivrUn());
        setAdresseLivrDeux(customer.getAdresseLivrDeux());
        setCpFact(customer.getCpFact());
        setVilleFact(customer.getVilleFact());
        setPaysFact(customer.getPaysFact());
        setCpLivr(customer.getCpLivr());
        setVilleLivr(customer.getVilleLivr());
        setPaysLivr(customer.getPaysLivr());
        setNomPrenomContact(customer.getNomPrenomContact());
        setFonctionContact(customer.getFonctionContact());
        setTelephone(customer.getTelephone());
        setPortable(customer.getPortable());
        setFax(customer.getFax());
        setNumeroCompte(customer.getNumeroCompte());
        setModeReglement(customer.getModeReglement());
        setCommentaire(customer.getCommentaire());
        setEmail(customer.getEmail());
        setSiteWeb(customer.getSiteWeb());
        setFamilleClientId(customer.getFamilleClientId());
        setBanque(customer.getBanque());
        setRemise(customer.getRemise());
        setRemiseFidelite(customer.getRemiseFidelite());
        setTotalEncaisser(customer.getTotalEncaisser());
        setCotaFidelite(customer.getCotaFidelite());
        setEcheancePaiement(customer.getEcheancePaiement());
        setCommerciauxId(customer.getCommerciauxId());
        setUpdateLastUserId(customer.getUpdateLastUserId());
        setUpdateLastTime(customer.getUpdateLastTime());
        setUserId(customer.getUserId());
        setPhoto1(customer.getPhoto1());
        setPhoto2(customer.getPhoto2());
    }

    public String getId() {
        return id;
    }

    public String getIdGLN() {
        return idGLN;
    }

    public void setIdGLN(String idGLN) {
        this.idGLN = idGLN;
    }

    public String getRaisonSociale() {
        return raisonSociale;
    }

    public String getCivilite() {
        return civilite;
    }

    public String getAdresseFactUn() {
        return adresseFactUn;
    }

    public String getAdresseFactDeux() {
        return adresseFactDeux;
    }

    public String getCpFact() {
        return cpFact;
    }

    public String getVilleFact() {
        return villeFact;
    }

    public String getPaysFact() {
        return paysFact;
    }

    public String getTelephone() {
        return telephone;
    }

    public String getPortable() {
        return portable;
    }

    public String getFax() {
        return fax;
    }

    public String getNumeroCompte() {
        return numeroCompte;
    }

    public String getModeReglement() {
        return modeReglement;
    }

    public String getCommentaire() {
        return commentaire;
    }

    public String getEmail() {
        return email;
    }

    public String getSiteWeb() {
        return siteWeb;
    }

    public String getBanque() {
        return banque;
    }

    public String getFamilleClientId() {
        return familleClientId;
    }

    public String getUpdateLastTime() {
        return updateLastTime;
    }

    public String getUpdateLastUserId() {
        return updateLastUserId;
    }

    public String getUserId() {
        return userId;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setRaisonSociale(String raisonSociale) {
        this.raisonSociale = raisonSociale;
    }

    public void setCivilite(String civilite) {
        this.civilite = civilite;
    }

    public void setAdresseFactUn(String adresseFactUn) {
        this.adresseFactUn = adresseFactUn;
    }

    public void setAdresseFactDeux(String adresseFactDeux) {
        this.adresseFactDeux = adresseFactDeux;
    }

    public void setCpFact(String cpFact) {
        this.cpFact = cpFact;
    }

    public void setVilleFact(String villeFact) {
        this.villeFact = villeFact;
    }

    public void setPaysFact(String paysFact) {
        this.paysFact = paysFact;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public void setPortable(String portable) {
        this.portable = portable;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public void setNumeroCompte(String numeroCompte) {
        this.numeroCompte = numeroCompte;
    }

    public void setModeReglement(String modeReglement) {
        this.modeReglement = modeReglement;
    }

    public void setCommentaire(String commentaire) {
        this.commentaire = commentaire;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setSiteWeb(String siteWeb) {
        this.siteWeb = siteWeb;
    }

    public void setBanque(String banque) {
        this.banque = banque;
    }

    public void setFamilleClientId(String familleClientId) {
        this.familleClientId = familleClientId;
    }

    public void setUpdateLastTime(String updateLastTime) {
        this.updateLastTime = updateLastTime;
    }

    public void setUpdateLastUserId(String updateLastUserId) {
        this.updateLastUserId = updateLastUserId;
    }

    public String getAdresseLivrUn() {
        return adresseLivrUn;
    }

    public Integer getCommerciauxId() {
        return commerciauxId;
    }

    public BigDecimal getCotaFidelite() {
        return cotaFidelite;
    }

    public String getCpLivr() {
        return cpLivr;
    }

    public BigDecimal getEcheancePaiement() {
        return echeancePaiement;
    }

    public String getFonctionContact() {
        return fonctionContact;
    }

    public String getNomPrenomContact() {
        return nomPrenomContact;
    }

    public String getPaysLivr() {
        return paysLivr;
    }

    public BigDecimal getRemise() {
        return remise;
    }

    public BigDecimal getRemiseFidelite() {
        return remiseFidelite;
    }

    public BigDecimal getTotalEncaisser() {
        return totalEncaisser;
    }

    public String getVilleLivr() {
        return villeLivr;
    }

    public void setAdresseLivrUn(String adresseLivrUn) {
        this.adresseLivrUn = adresseLivrUn;
    }

    public void setCommerciauxId(Integer commerciauxId) {
        this.commerciauxId = commerciauxId;
    }

    public void setCotaFidelite(BigDecimal cotaFidelite) {
        this.cotaFidelite = cotaFidelite;
    }

    public void setCpLivr(String cpLivr) {
        this.cpLivr = cpLivr;
    }

    public void setEcheancePaiement(BigDecimal echeancePaiement) {
        this.echeancePaiement = echeancePaiement;
    }

    public void setFonctionContact(String fonctionContact) {
        this.fonctionContact = fonctionContact;
    }

    public void setNomPrenomContact(String nomPrenomContact) {
        this.nomPrenomContact = nomPrenomContact;
    }

    public void setPaysLivr(String paysLivr) {
        this.paysLivr = paysLivr;
    }

    public void setRemise(BigDecimal remise) {
        this.remise = remise;
    }

    public void setRemiseFidelite(BigDecimal remiseFidelite) {
        this.remiseFidelite = remiseFidelite;
    }

    public void setTotalEncaisser(BigDecimal totalEncaisser) {
        this.totalEncaisser = totalEncaisser;
    }

    public void setVilleLivr(String villeLivr) {
        this.villeLivr = villeLivr;
    }

    public String getAdresseLivrDeux() {
        return adresseLivrDeux;
    }

    public void setAdresseLivrDeux(String adresseLivrDeux) {
        this.adresseLivrDeux = adresseLivrDeux;
    }

    public byte[] getPhoto1() {
        return photo1;
    }

    public void setPhoto1(byte photo1[]) {
        this.photo1 = photo1;
    }

    public byte[] getPhoto2() {
        return photo2;
    }

    public void setPhoto2(byte photo2[]) {
        this.photo2 = photo2;
    }

    public String toString() {
        StringBuffer str = new StringBuffer("{");
        str.append("id=" + getId() + " " + "idGLN=" + getIdGLN() + " " + "raisonSociale=" + getRaisonSociale() + " " + "civilite=" + getCivilite() + " " + "adresseFactUn=" + getAdresseFactUn() + " " + "adresseFactDeux=" + getAdresseFactDeux() + " " + "adresseLivrUn=" + getAdresseLivrUn() + " " + "adresseLivrDeux=" + getAdresseLivrDeux() + " " + "cpFact=" + getCpFact() + " " + "villeFact=" + getVilleFact() + " " + "paysFact=" + getPaysFact() + " " + "cpLivr=" + getCpLivr() + " " + "villeLivr=" + getVilleLivr() + " " + "paysLivr=" + getPaysLivr() + " " + "nomPrenomContact=" + getNomPrenomContact() + " " + "fonctionContact=" + getFonctionContact() + " " + "telephone=" + getTelephone() + " " + "portable=" + getPortable() + " " + "fax=" + getFax() + " " + "numeroCompte=" + getNumeroCompte() + " " + "modeReglement=" + getModeReglement() + " " + "commentaire=" + getCommentaire() + " " + "email=" + getEmail() + " " + "siteWeb=" + getSiteWeb() + " " + "familleClientId=" + getFamilleClientId() + " " + "banque=" + getBanque() + " " + "remise=" + getRemise() + " " + "remiseFidelite=" + getRemiseFidelite() + " " + "totalEncaisser=" + getTotalEncaisser() + " " + "cotaFidelite=" + getCotaFidelite() + " " + "echeancePaiement=" + getEcheancePaiement() + " " + "commerciauxId=" + getCommerciauxId() + " " + "updateLastUserId=" + getUpdateLastUserId() + " " + "updateLastTime=" + getUpdateLastTime() + " " + "userId=" + getUserId());
        str.append('}');
        return str.toString();
    }

    public boolean equals(Object pOther) {
        if (pOther instanceof Customer) {
            Customer lTest = (Customer) pOther;
            boolean lEquals = true;
            if (id == null) {
                lEquals = lEquals && lTest.id == null;
            } else {
                lEquals = lEquals && id.equals(lTest.id);
            }
            if (idGLN == null) {
                lEquals = lEquals && lTest.idGLN == null;
            } else {
                lEquals = lEquals && idGLN.equals(lTest.idGLN);
            }
            if (raisonSociale == null) {
                lEquals = lEquals && lTest.raisonSociale == null;
            } else {
                lEquals = lEquals && raisonSociale.equals(lTest.raisonSociale);
            }
            if (civilite == null) {
                lEquals = lEquals && lTest.civilite == null;
            } else {
                lEquals = lEquals && civilite.equals(lTest.civilite);
            }
            if (adresseFactUn == null) {
                lEquals = lEquals && lTest.adresseFactUn == null;
            } else {
                lEquals = lEquals && adresseFactUn.equals(lTest.adresseFactUn);
            }
            if (adresseFactDeux == null) {
                lEquals = lEquals && lTest.adresseFactDeux == null;
            } else {
                lEquals = lEquals && adresseFactDeux.equals(lTest.adresseFactDeux);
            }
            if (adresseLivrUn == null) {
                lEquals = lEquals && lTest.adresseLivrUn == null;
            } else {
                lEquals = lEquals && adresseLivrUn.equals(lTest.adresseLivrUn);
            }
            if (adresseLivrDeux == null) {
                lEquals = lEquals && lTest.adresseLivrDeux == null;
            } else {
                lEquals = lEquals && adresseLivrDeux.equals(lTest.adresseLivrDeux);
            }
            if (cpFact == null) {
                lEquals = lEquals && lTest.cpFact == null;
            } else {
                lEquals = lEquals && cpFact.equals(lTest.cpFact);
            }
            if (villeFact == null) {
                lEquals = lEquals && lTest.villeFact == null;
            } else {
                lEquals = lEquals && villeFact.equals(lTest.villeFact);
            }
            if (paysFact == null) {
                lEquals = lEquals && lTest.paysFact == null;
            } else {
                lEquals = lEquals && paysFact.equals(lTest.paysFact);
            }
            if (cpLivr == null) {
                lEquals = lEquals && lTest.cpLivr == null;
            } else {
                lEquals = lEquals && cpLivr.equals(lTest.cpLivr);
            }
            if (villeLivr == null) {
                lEquals = lEquals && lTest.villeLivr == null;
            } else {
                lEquals = lEquals && villeLivr.equals(lTest.villeLivr);
            }
            if (paysLivr == null) {
                lEquals = lEquals && lTest.paysLivr == null;
            } else {
                lEquals = lEquals && paysLivr.equals(lTest.paysLivr);
            }
            if (telephone == null) {
                lEquals = lEquals && lTest.telephone == null;
            } else {
                lEquals = lEquals && telephone.equals(lTest.telephone);
            }
            if (portable == null) {
                lEquals = lEquals && lTest.portable == null;
            } else {
                lEquals = lEquals && portable.equals(lTest.portable);
            }
            if (fax == null) {
                lEquals = lEquals && lTest.fax == null;
            } else {
                lEquals = lEquals && fax.equals(lTest.fax);
            }
            if (numeroCompte == null) {
                lEquals = lEquals && lTest.numeroCompte == null;
            } else {
                lEquals = lEquals && numeroCompte.equals(lTest.numeroCompte);
            }
            if (modeReglement == null) {
                lEquals = lEquals && lTest.modeReglement == null;
            } else {
                lEquals = lEquals && modeReglement.equals(lTest.modeReglement);
            }
            if (commentaire == null) {
                lEquals = lEquals && lTest.commentaire == null;
            } else {
                lEquals = lEquals && commentaire.equals(lTest.commentaire);
            }
            if (email == null) {
                lEquals = lEquals && lTest.email == null;
            } else {
                lEquals = lEquals && email.equals(lTest.email);
            }
            if (siteWeb == null) {
                lEquals = lEquals && lTest.siteWeb == null;
            } else {
                lEquals = lEquals && siteWeb.equals(lTest.siteWeb);
            }
            if (familleClientId == null) {
                lEquals = lEquals && lTest.familleClientId == null;
            } else {
                lEquals = lEquals && familleClientId.equals(lTest.familleClientId);
            }
            if (banque == null) {
                lEquals = lEquals && lTest.banque == null;
            } else {
                lEquals = lEquals && banque.equals(lTest.banque);
            }
            if (updateLastUserId == null) {
                lEquals = lEquals && lTest.updateLastUserId == null;
            } else {
                lEquals = lEquals && updateLastUserId.equals(lTest.updateLastUserId);
            }
            if (updateLastTime == null) {
                lEquals = lEquals && lTest.updateLastTime == null;
            } else {
                lEquals = lEquals && updateLastTime.equals(lTest.updateLastTime);
            }
            if (userId == null) {
                lEquals = lEquals && lTest.userId == null;
            } else {
                lEquals = lEquals && userId.equals(lTest.userId);
            }
            if (nomPrenomContact == null) {
                lEquals = lEquals && lTest.nomPrenomContact == null;
            } else {
                lEquals = lEquals && nomPrenomContact.equals(lTest.nomPrenomContact);
            }
            if (fonctionContact == null) {
                lEquals = lEquals && lTest.fonctionContact == null;
            } else {
                lEquals = lEquals && fonctionContact.equals(lTest.fonctionContact);
            }
            if (remise == null) {
                lEquals = lEquals && lTest.remise == null;
            } else {
                lEquals = lEquals && remise.equals(lTest.remise);
            }
            if (remiseFidelite == null) {
                lEquals = lEquals && lTest.remiseFidelite == null;
            } else {
                lEquals = lEquals && remiseFidelite.equals(lTest.remiseFidelite);
            }
            if (totalEncaisser == null) {
                lEquals = lEquals && lTest.totalEncaisser == null;
            } else {
                lEquals = lEquals && totalEncaisser.equals(lTest.totalEncaisser);
            }
            if (cotaFidelite == null) {
                lEquals = lEquals && lTest.cotaFidelite == null;
            } else {
                lEquals = lEquals && cotaFidelite.equals(lTest.cotaFidelite);
            }
            if (echeancePaiement == null) {
                lEquals = lEquals && lTest.echeancePaiement == null;
            } else {
                lEquals = lEquals && echeancePaiement.equals(lTest.echeancePaiement);
            }
            if (commerciauxId == null) {
                lEquals = lEquals && lTest.commerciauxId == null;
            } else {
                lEquals = lEquals && commerciauxId.equals(lTest.commerciauxId);
            }
            if (photo1 == null) {
                lEquals = lEquals && lTest.photo1 == null;
            } else {
                lEquals = lEquals && photo1.equals(lTest.photo1);
            }
            if (photo2 == null) {
                lEquals = lEquals && lTest.photo2 == null;
            } else {
                lEquals = lEquals && photo2.equals(lTest.photo2);
            }
            return lEquals;
        } else {
            return false;
        }
    }

    public int hashCode() {
        int result = 17;
        result = 37 * result + (id == null ? 0 : id.hashCode());
        result = 37 * result + (idGLN == null ? 0 : idGLN.hashCode());
        result = 37 * result + (raisonSociale == null ? 0 : raisonSociale.hashCode());
        result = 37 * result + (civilite == null ? 0 : civilite.hashCode());
        result = 37 * result + (adresseFactUn == null ? 0 : adresseFactUn.hashCode());
        result = 37 * result + (adresseFactDeux == null ? 0 : adresseFactDeux.hashCode());
        result = 37 * result + (adresseLivrUn == null ? 0 : adresseLivrUn.hashCode());
        result = 37 * result + (adresseLivrDeux == null ? 0 : adresseLivrDeux.hashCode());
        result = 37 * result + (cpFact == null ? 0 : cpFact.hashCode());
        result = 37 * result + (villeFact == null ? 0 : villeFact.hashCode());
        result = 37 * result + (paysFact == null ? 0 : paysFact.hashCode());
        result = 37 * result + (cpLivr == null ? 0 : cpLivr.hashCode());
        result = 37 * result + (villeLivr == null ? 0 : villeLivr.hashCode());
        result = 37 * result + (paysLivr == null ? 0 : paysLivr.hashCode());
        result = 37 * result + (telephone == null ? 0 : telephone.hashCode());
        result = 37 * result + (portable == null ? 0 : portable.hashCode());
        result = 37 * result + (fax == null ? 0 : fax.hashCode());
        result = 37 * result + (numeroCompte == null ? 0 : numeroCompte.hashCode());
        result = 37 * result + (modeReglement == null ? 0 : modeReglement.hashCode());
        result = 37 * result + (commentaire == null ? 0 : commentaire.hashCode());
        result = 37 * result + (email == null ? 0 : email.hashCode());
        result = 37 * result + (siteWeb == null ? 0 : siteWeb.hashCode());
        result = 37 * result + (familleClientId == null ? 0 : familleClientId.hashCode());
        result = 37 * result + (banque == null ? 0 : banque.hashCode());
        result = 37 * result + (updateLastUserId == null ? 0 : updateLastUserId.hashCode());
        result = 37 * result + (updateLastTime == null ? 0 : updateLastTime.hashCode());
        result = 37 * result + (userId == null ? 0 : userId.hashCode());
        result = 37 * result + (nomPrenomContact == null ? 0 : nomPrenomContact.hashCode());
        result = 37 * result + (fonctionContact == null ? 0 : fonctionContact.hashCode());
        result = 37 * result + (remise == null ? 0 : remise.hashCode());
        result = 37 * result + (remiseFidelite == null ? 0 : remiseFidelite.hashCode());
        result = 37 * result + (totalEncaisser == null ? 0 : totalEncaisser.hashCode());
        result = 37 * result + (cotaFidelite == null ? 0 : cotaFidelite.hashCode());
        result = 37 * result + (echeancePaiement == null ? 0 : echeancePaiement.hashCode());
        result = 37 * result + (commerciauxId == null ? 0 : commerciauxId.hashCode());
        result = 37 * result + (photo1 == null ? 0 : photo1.hashCode());
        result = 37 * result + (photo2 == null ? 0 : photo2.hashCode());
        return result;
    }
    private String id;
    private String banque;
    private String raisonSociale;
    private String civilite;
    private String adresseFactUn;
    private String adresseFactDeux;
    private String adresseLivrUn;
    private String adresseLivrDeux;
    private String cpFact;
    private String cpLivr;
    private String villeFact;
    private String villeLivr;
    private String paysFact;
    private String paysLivr;
    private String nomPrenomContact;
    private String fonctionContact;
    private String telephone;
    private String portable;
    private String fax;
    private String email;
    private String siteWeb;
    private String numeroCompte;
    private String modeReglement;
    private String commentaire;
    private String familleClientId;
    private String updateLastUserId;
    private String updateLastTime;
    private String userId;
    private String idGLN;
    private BigDecimal remise;
    private BigDecimal remiseFidelite;
    private BigDecimal totalEncaisser;
    private BigDecimal cotaFidelite;
    private BigDecimal echeancePaiement;
    private Integer commerciauxId;
    private byte photo1[];
    private byte photo2[];
}
